<?php

/**
 * sfAsset form.
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class sfAssetForm extends BasesfAssetForm
{
    public function configure()
    {
        unset($this['link_content_asset_list']);
        unset($this['created_at']);
        
        
        $this->widgetSchema['preview'] = new sfWidgetPartialView(array('partial_name'=>'sfAsset/sidebar_edit','partial_options'=>array('sf_asset' => $this->getObject())   ));
        $this->validatorSchema['type'] = new sfValidatorChoice(array('choices'=>sfConfig::get('app_sfAssetsLibrary_types', array('image', 'video','txt', 'archive', 'pdf', 'xls', 'doc', 'ppt'))));

        $this->widgetSchema['type'] = new sfWidgetFormChoice(array('choices'=>sfConfig::get('app_sfAssetsLibrary_types', array('image', 'video','txt', 'archive', 'pdf', 'xls', 'doc', 'ppt'))));
        $this->validatorSchema['type'] = new sfValidatorChoice(array('choices'=>sfConfig::get('app_sfAssetsLibrary_types', array('image', 'video','txt', 'archive', 'pdf', 'xls', 'doc', 'ppt'))));
        
        $this->widgetSchema['type'] = new sfWidgetFormChoice(array('choices'=>sfAssetsLibraryTools::getTypes()));
        $this->validatorSchema['type'] = new sfValidatorChoice(array('choices'=>sfAssetsLibraryTools::getTypes()));
        
        $this->validatorSchema->setOption('allow_extra_fields', true);
        $this->widgetSchema->moveField('preview','first');
    }
}
